home *** CD-ROM | disk | FTP | other *** search
Text File | 1988-08-01 | 5.4 KB | 239 lines | [TEXT/MPS ] |
- ; File ResEd68k.a
- ;
- ; Copyright Apple Computer, Inc. 1984-1988
- ; All rights reserved.
-
- ; This is the standard interface for a Resource Standard Code segment for use
- ; by the resource editor. The main resource editor will dispatch to this code
- ; when the user opens the respective type for editing. Dispatches will also
- ; occur with menu commands and events for this window. This code should be
- ; included in the resource editor file under type RSSC with any unique ID.
- ; It's resource name should consist of the type it's willing to edit.
- ; Each code segment MUST have a window and its kind MUST be the ID of the code
- ; and the refcon usually contains the handle to the instance of the object
- ; who's owned by the code. On activate/deactivate events, the code can put up
- ; and remove any menus if desired.
-
- ; The standard routines are:
-
- ; EditBirth( thing:Handle; parent: ParentHandle );
-
- ; PickBirth( t: ResType; parent: ParentHandle );
-
- ; DoMenu( menu, item: INTEGER; object: Handle );
-
- ; DoEvent( VAR evt: EvtRecord; object: Handle );
-
-
-
- STRING ASIS
-
- PRINT OFF
- INCLUDE 'QuickEqu.a'
- INCLUDE 'ToolEqu.a'
- INCLUDE 'SysEqu.a'
- INCLUDE 'Traps.a'
- PRINT ON
-
- StdRSC PROC EXPORT
-
- IMPORT PickBirth
- IMPORT EditBirth
- IMPORT DoEvent
- IMPORT DoMenu
- IMPORT DoInfoUpdate
-
- EXPORT StdHeader
-
- EXPORT ResEdID
- EXPORT ResEditRes
- EXPORT ResEverest
- EXPORT CallPBirth
- EXPORT CallEBirth
- EXPORT CallMenu
- EXPORT CallEvent
- EXPORT CallInfoUpdate
- EXPORT Passmenu
-
- StdHeader
- DC.L ('RSSC')
-
- DC.W JEditBirth-StdHeader
- DC.W JPickBirth-StdHeader
- DC.W JDoEvent-StdHeader
- DC.W JDoMenu-StdHeader
- DC.W JDoInfoUpdate-StdHeader
- DC.W 0
- DC.W 0
- DC.W 0
- DC.W 0
- JEditBirth
- JMP EditBirth
- JPickBirth
- JMP PickBirth
- JDoEvent
- JMP DoEvent
- JDoMenu
- JMP DoMenu
- JDoInfoUpdate
- JMP DoInfoUpdate
-
- ;-----------------------------------------------------------------------------------
- ;
- ; CallEBirth(thing:Handle;parent:ParentHandle;id:Integer);
- ; CallPBirth(thing:Handle;parent:ParentHandle;id:Integer);
- ;
- ;-----------------------------------------------------------------------------------
- CallEBirth MOVE.L (SP)+,A0
- MOVE.L #0,-(SP)
- BRA.S CallIt
-
- CallPBirth MOVE.L (SP)+,A0
- MOVE.L #2,-(SP)
-
- CallIt
- MOVE.L A0,-(SP)
-
- ; Calls back to main program
- ; EXPORT CallEBirth
- ; EXPORT CallPBirth
-
- EXPORT CallEvent
- EXPORT CallMenu
- EXPORT CallInfoUpdate
-
- EXPORT PassMenu
-
- EXPORT ResEditRes
- EXPORT ResEverest
- EXPORT GetThePort
-
- EXPORT WindAlloc
- EXPORT WindFree
- EXPORT WindList
- EXPORT WindOrigin
- EXPORT WindSetup
-
- EXPORT AbleMenu
- EXPORT AppRes
- EXPORT AddNewRes
- EXPORT BubbleUp
- EXPORT BuildType
- EXPORT ClearHand
- EXPORT ConcatStr
- EXPORT CopyRes
- EXPORT Count1Res
- EXPORT Count1Type
- EXPORT CurrentRes
- EXPORT DoListEvt
- EXPORT DupPick
- EXPORT ErrorCheck
- EXPORT FileNewType
- EXPORT FixHand
- EXPORT GetStr
- EXPORT Get1Index
- EXPORT Get1IdxType
- EXPORT Get1Res
- EXPORT GiveEBirth
- EXPORT HandleCheck
- EXPORT MetaKeys
- EXPORT NewRes
- EXPORT PickEvent
- EXPORT PickInfoUp
- EXPORT PickMenu
- EXPORT ScrapCopy
- EXPORT ScrapEmpty
- EXPORT ScrapPaste
- EXPORT SetResChanged
- EXPORT SetETitle
- EXPORT RevertResource
- EXPORT ShowInfo
- EXPORT RSeedFill
- EXPORT RCalcMask
-
- CallOut BSR.S DivingBoard
- WindAlloc BSR.S DivingBoard
- WindFree BSR.S DivingBoard
- WindList BSR.S DivingBoard
- WindOrigin BSR.S DivingBoard
- WindSetup BSR.S DivingBoard
-
- ; Common stuff
- AbleMenu BSR.S DivingBoard
- AppRes BSR.S DivingBoard
- AddNewRes BSR.S DivingBoard
- BubbleUp BSR.S DivingBoard ;10
- BuildType BSR.S DivingBoard
- ClearHand BSR.S DivingBoard
- CopyRes BSR.S DivingBoard
- ConcatStr BSR.S DivingBoard
- Count1Res BSR.S DivingBoard
- Count1Type BSR.S DivingBoard
- CurrentRes BSR.S DivingBoard
- DoListEvt BSR.S DivingBoard
- DupPick BSR.S DivingBoard
- ErrorCheck BSR.S DivingBoard ;20
- FileNewType BSR.S DivingBoard
- FixHand BSR.S DivingBoard
- GetStr BSR.S DivingBoard
- Get1Index BSR.S DivingBoard
- Get1IdxType BSR.S DivingBoard
- Get1Res BSR.S DivingBoard
- GiveEBirth BSR.S DivingBoard
- HandleCheck BSR.S DivingBoard
- MetaKeys BSR.S DivingBoard
- NewRes BSR.S DivingBoard ;30
- PickEvent BSR.S DivingBoard
- PickInfoUp BSR.S DivingBoard
- PickMenu BSR.S DivingBoard
- RevertResource BSR.S DivingBoard
- ScrapCopy BSR.S DivingBoard
- ScrapEmpty BSR.S DivingBoard
- ScrapPaste BSR.S DivingBoard
- SetResChanged BSR.S DivingBoard
- ShowInfo BSR.S DivingBoard
- SetETitle BSR.S DivingBoard ;40
- CallEvent BSR.S DivingBoard
- CallMenu BSR.S DivingBoard
- CallInfoUpdate BSR.S DivingBoard
- PassMenu BSR.S DivingBoard
- ResEditRes BSR.S DivingBoard
- ResEverest BSR.S DivingBoard
- GetThePort BSR.S DivingBoard
- RSeedFill BSR.S DivingBoard ; 50
- RCalcMask BSR.S DivingBoard ; 51
-
- NOP
-
- DivingBoard
- LEA CallOut+2,A1
- MOVE.L (SP)+,A0
- SUB.L A1,A0
- ADD.L A0,A0
- ADD.L ApplScratch,A0
- MOVE.L (A0),A0
- JMP (A0)
-
-
- ; Gets Res ID of self and returns it
- ; FUNCTION ResEdID: INTEGER;
-
- ResEdID
- LINK A6,#-256
-
- LEA stdHeader,A0
- _RecoverHandle
-
- MOVE.L A0,-(SP) ; pass handle
- PEA 8(A6) ; function result
- PEA -256(A6) ; ignore type
- MOVE.L (SP),-(SP) ; ignore name
- _GetResInfo
-
- UNLK A6
-
- RTS
-
- END
-
-